<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 动态注册路由
use think\Route;

// 个人中心
Route::any('people/:user_id$', 'People/index');
Route::any('people_question/:user_id$', 'People/question');
Route::any('people_answer/:user_id$', 'People/answer');
Route::any('people_fav_question/:user_id$', 'People/fav_question');
Route::any('people_fav_article/:user_id$', 'People/fav_article');

// 问答模块
Route::any('question/:ask_id$', 'Question/detail', '', ['ask_id' => '\d+']);
Route::any('question$', 'Question/index');
Route::any('question_submit$', 'Question/submit');

// 文章模块
Route::any('article/:article_id$', 'Article/detail', '', ['ask_id' => '\d+']);
Route::any('article$', 'Article/index');
Route::any('search/index', 'Search/question');

// 单篇文章模块
Route::any(':module$', 'Page/index');
// 免费软件下载
Route::any('software$', 'Index/software');